<?php
/**
 * Created by PhpStorm.
 * User: landiyu
 * Date: 15-03-27
 * Time: 11:05
 */

namespace Home\Controller;
use OT\DataDictionary;

/**
 * 用户控制器
 * 包括用户中心，用户登录及注册
 */
class ServiceManageController extends HomeController
{
    public function insertgrmsgedit(){

        //phpinfo();

        //设置北京时间并获取时间戳
        date_default_timezone_set('PRC');
        $datetime = date("Y-m-d H:i:s",  time());

        $Model = M();
        //进行原生的SQL查询
        $str = "INSERT INTO `sdg_systemmsg` (`id`, `from`, `to`, `msg`, `inputdatetime`) VALUES (NULL, '', '', '".$_REQUEST["msg"]."', '".$datetime."')";
        //echo $str;
        $Model->query($str);


        $url = $_SERVER["HTTP_REFERER"];
        echo "<script language='javascript' type='text/javascript'>";
        echo "window.location.href='$url'";
        echo "</script>";
    }
}


